<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*, com.zjr.domain.*"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath %>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="skin/css/base_style.css" />
<link type="text/css" rel="stylesheet" href="skin/css/table.css" />
<script type="text/javascript" src="skin/js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="skin/js/table.js"></script>
</head>
<body>
	<table class="tab">
		<tr>
	        <th width="5%" class="tab_th fyh"><img src="skin/images/lcp_checkbox5.png" /></th>
	        <th width="10%" class="tab_th fyh">ID</th>
	        <th width="10%" class="tab_th fyh">用户名</th>
	        <th width="10%" class="tab_th fyh">密码</th>
	        <th width="10%" class="tab_th fyh">部门</th>
	        <th width="10%" class="tab_th fyh">电话</th>
	        <th width="10%" class="tab_th fyh">地址</th>
	        <th width="10%" class="tab_th fyh">职位</th>
	        <th width="25%" class="tab_th fyh">操作</th>
    	</tr>
		
		<s:iterator value="#request.users" id="user" status="ind">
    	<tr>
    		<td class="tab_td1 fyh"><s:property value="#ind.index+1"/></td>
    		<td class="tab_td1 fyh"><s:property value="#user.uid" /></td>
    		<td class="tab_td1 fyh"><s:property value="#user.username" /></td>
    		<td class="tab_td1 fyh"><s:property value="#user.password" /></td>
    		<td class="tab_td1 fyh"><s:property value="#user.did" /></td>
    		<td class="tab_td1 fyh"><s:property value="#user.phone" /></td>
    		<td class="tab_td1 fyh"><s:property value="#user.address" /></td>
    		<td class="tab_td1 fyh"><s:property value="#user.position" /></td>
    		<td class="tab_td1 fyh">
    		<s:if test="#user.uid != 1">
        		<input type="button" onclick="window.location.href='user/user_delete?uid=<s:property value="#user.uid" />'"  class="tab_button1"/>
        		<input type="button" onclick="window.location.href='user/user_findById?uid=<s:property value="#user.uid" />'"  class="tab_button2" />
       		</s:if>
       		</td>
    	</tr>
		</s:iterator>
	</table>
	<div class="table_page">
		<s:if test="#request.page.currentPage != 1">
	    <input type="button" class="page_button1" onclick="window.location.href='user/user_queryUser?pageCurrent=1'"/>
	    <input type="button" class="page_button2" onclick="window.location.href='user/user_queryUser?pageCurrent=${page.currentPage-1}'"/>
	    </s:if>
	    <label class="page_number">${page.currentPage }</label>
	    <label class="page_number">/</label>
	    <label class="page_number">${page.totalPage }</label>
	    <s:if test="#request.page.currentPage != #request.page.totalPage">
	    <input type="button" class="page_button3" onclick="window.location.href='user/user_queryUser?pageCurrent=${page.currentPage+1}'"/>
	    <input type="button" class="page_button4" onclick="window.location.href='user/user_queryUser?pageCurrent=${page.totalPage}'"/>
	    </s:if>
	</div>
</body>
</html>